home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / passwrd9.zip / PASSWORD.DOC < prev    next >
Text File  |  1989-03-18  |  9KB  |  151 lines

  1.                             PASSWORD DOCUMENTATION
  2.  
  3.                             Written by John Jaeger
  4.                                  Date: 3/15/89
  5.  
  6.     Included in password.pak: PASSWORD.DOC
  7.                               PASSWORD.BIN
  8.                               PASSWORD.ASM
  9.                               PWINT   .ASM
  10.                               PWINT   .EXE
  11.                               LOCK    .COM
  12.  
  13.                                     HISTORY
  14.  
  15.     This program is a major change to PASSWRD6.ARC that was supplied by Bob 
  16.     Montgomery  on 1/5/87.  I downloaded his program a few weeks ago  while 
  17.     looking for a reasonably simple password program.  His program revolved 
  18.     around having the ANSI system driver operating on the computer.  He was 
  19.     kind  enough to supply the A86 assembler source code with his  program, 
  20.     and since I do not use ANSI or have the A86 assembler, I added all  the 
  21.     necessary assumes, segments, etc. as per his documentation and compiled 
  22.     it  with MASM.  It did not work.  I tried loading the ANSI  driver  and 
  23.     used his supplied object code and everything worked as advertised.
  24.  
  25.     After comparing his supplied object code with the object code  produced 
  26.     by  MASM with symbug, I found a couple small errors in his source  code 
  27.     from what his object code was.  This may be from two possibilities,  1)  
  28.     I  am  not very familiar with A86 source code, and  2) the  possibility 
  29.     exists  that  after he compiled his object code he may have  done  some 
  30.     cosmetic  typing on the source before uploading and he just  dropped  a 
  31.     couple characters.  In any event his object code program does work!
  32.  
  33.     Since  I had to retype the source code for MASM, I started making  some 
  34.     changes.   First, for those who do not have A86, changing the  password 
  35.     with Debug leaves a lot to be desired.  Especially since it was  stated 
  36.     that  you may use up to 16 characters +1 for the character  count.   If 
  37.     someone  were  to do that, there is no padding in the object  code  for 
  38.     anything  over  8,  therefor I suspect anyone modifying  the  code  and 
  39.     attempting more than 8 characters had the program crash.  Hence, I have 
  40.     made  a  installation program (PWINT.EXE).  This  program  provides  an 
  41.     interface  between the user and the ultimate .SYS file for  the  device 
  42.     driver.   Anyone  can install his/her password without  difficulty  and 
  43.     without either Debug, A80, or MASM.  Second, I did not like the idea of 
  44.     having  anyone accidentally view the .SYS file with XTREE or any  other 
  45.     like  program  and have all the prompts and PASSWORD leap  out  on  the 
  46.     screen.  I then used a small routine to remove the ASCII representation 
  47.     of  the characters when the PASSWORD.SYS file was written to  the  disk 
  48.     with  the user password installed.  No more viewing!  Third  I  changed 
  49.     the  program  LOCK.COM  to add the preferred 4Ch Int 21h  DOS  call  to 
  50.     terminate  the program.  I also added a IRET to the main program  where 
  51.     it returns to LOCK.COM to keep it standard.
  52.  
  53.     The  resident portion of the program from Mr. Montgomery was 590  bytes 
  54.     long.   This  one is 820 byte long, however it does not need  the  ANSI 
  55.     system for snappy screen displays as I have included direct writing  to 
  56.     the video RAM (Sometimes not recommended).  I have tried the program on 
  57.     three machines in the office here, and all are of different manufacture 
  58.     with  two  being 286 machines (1 Portable) and one a turbo  PC-XT.   It 
  59.     seems to  function well with no glitches in the display.  If  for  some 
  60.     reason you have difficulty in that area, let me know where your display 
  61.     RAM is located, and I will shoot you a copy that will work.
  62.     This  is my first offering back to the GEnie IBM Software  library.   I 
  63.     have  done a reasonable amount of assembly language programming but  am 
  64.     far  from  being  a whiz, so some of my ways of getting  there  may  be 
  65.     antiquated  or  clumsy.   Please, feel free to  comment  both  positive 
  66.     and/or negative on the results of the program.
  67.  
  68.                                  INSTALLATION
  69.  
  70.     Un-archive  all the files indicated above preferably on a  floppy.   If 
  71.     you  have already done this on a fixed disk, copy to the floppy  (which 
  72.     must  have boot system and the file CONFIG.SYS in the  root  directory) 
  73.     the following files: 1) PWINT   .EXE
  74.                          2) PASSWORD.BIN
  75.                          3) LOCK    .COM
  76.  
  77.     Be  sure to SAVE a original copy of PASSWORD.BIN so that if you  desire 
  78.     to change the password in the future you'll have the uninitialized file 
  79.     to start with.
  80.  
  81.     At  the  DOS prompt type PWINIT (ie: A>PWINIT).  You should see  a  box 
  82.     displayed  in  the  center  of the screen with  a  prompt  to  enter  a 
  83.     password.  If it does not appear then you have neither a monochrome  or 
  84.     color display card in your system.  PWINIT looks for either a 3 or a  7 
  85.     by  using  the DOS interrupt 10h, Function 0FH and checking  the  video 
  86.     mode  number.  If it isn't a 7 (Monochrome Display), it  assumes  Color 
  87.     and  assumes the  video RAM is at 0B800H.  If no display, I  apologize.  
  88.     I know what assume means!  Just let me know what type you have and I'll 
  89.     correct it.
  90.  
  91.     Once  you  have the box with the prompt all else will work  fine.   The 
  92.     password you enter can be up to 15 characters.  Careful with spaces  or 
  93.     non-printing characters.  The program WILL remember them exactly as you 
  94.     enter  them.   A RETURN will enter the string and then  re-display  the 
  95.     password for your approval.  A 'N' at this point will return you to the 
  96.     original prompt for password.  A Control-C will exit the program.
  97.  
  98.     A  'Y' answer records the password in the PASSWORD.BIN file  in  memory 
  99.     and  encodes the ASCII display.  It then writes the memory image  to  a 
  100.     file  called  PASSWORD.SYS.  At this point for tests you may  leave  it 
  101.     named as is.  Add the device name to your CONFIG.SYS file as:
  102.  
  103.                               DEVICE=PASSWORD.SYS
  104.  
  105.                                    OPERATION
  106.  
  107.     Now do a boot of the system with the floppy in drive A: and you  should 
  108.     see  the  familiar box asking for your password.  You  have  three  (3) 
  109.     tries  to  get it correct!  If the correct password is given,  the  box 
  110.     should  display  **** Password Accepted **** , and  the  floppy  should 
  111.     continue  the boot as normal.  The device is loaded into memory  before 
  112.     the  complete  image  of  COMMAND.COM and before  any  reading  of  the 
  113.     AUTOEXEC.BAT  file.   If  the program resides on the  boot  disk  (Your 
  114.     floppies or Hard Disk) it cannot be bypassed!
  115.  
  116.     If  you should fail to enter the correct word in 3 tries,  the  program 
  117.     disables  all  interrupts and displays ***** Access  Denied  *****  and 
  118.     jumps in a closed loop.  This requires either Reset Switch (If you have 
  119.     one) or power down!
  120.     The  file  PASSWORD.BIN  must  be on the same  disk  and  in  the  same 
  121.     directory as PWINT.EXE.
  122.  
  123.     The  program  PWINT.EXE has a brief description of disk errors  in  the 
  124.     window to assist with problems.   If a disk error occurs with PWINT.EXE 
  125.     (other  than DOS critical errors like not having the drive door  closed 
  126.     etc.) the program will abort via normal DOS operations which will  keep 
  127.     files in order and issue a related message.
  128.  
  129.     Once  you are satisfied that all functions normally, rename the  device 
  130.     driver  in your CONFIG.SYS file to something not related to a  password 
  131.     program and change the name of PASSWORD.SYS to match.
  132.  
  133.                                    LOCK.COM
  134.  
  135.     LOCK.COM is provided to lock the computer and require the password from 
  136.     the  command line at any DOS prompt.  Store it with your  other  system 
  137.     files  where  DOS can find it and type LOCK.  It does a  interrupt  66h 
  138.     which  is  how  the device driver for